# def create_brt_class():
class BRT:
    def __init__(self, rdata, gdata, bdata, wdata, mapr, mapg, mapb, mapw, kernelR, kernelG, kernelB, kernelW, color, gray_level, extra):
        self.R = rdata
        self.G = gdata
        self.B = bdata
        self.W = wdata
        self.mapR = mapr
        self.mapG = mapg
        self.mapB = mapb
        self.mapW = mapw
        self.kernelR = kernelR
        self.kernelG = kernelG
        self.kernelB = kernelB
        self.kernelW = kernelW
        self.color = color
        self.gray_level = gray_level
        self.extra = extra

    def __getitem__(self, key):
        if key == 'R':
            return self.R
        elif key == 'G':
            return self.G
        elif key == 'B':
            return self.B
        elif key == 'W':
            return self.W
        elif key == 'mapR':
            return self.mapR
        elif key == 'mapG':
            return self.mapG
        elif key == 'mapB':
            return self.mapB
        elif key == 'mapW':
            return self.mapW
        elif key == 'kernelR':
            return self.kernelR
        elif key == 'kernelG':
            return self.kernelG
        elif key == 'kernelB':
            return self.kernelB
        elif key == 'kernelW':
            return self.kernelW
        elif key == 'color':
            return self.color
        elif key == 'gray_level':
            return self.gray_level
        elif key == 'extra':
            return self.extra
        else:
            raise KeyError('brt has no key')

    def __setitem__(self, key, value):
        if key == 'R':
            self.R = value
        elif key == 'G':
            self.G = value
        elif key == 'B':
            self.B = value
        elif key == 'W':
            self.W = value
        elif key == 'mapR':
            self.mapR = value
        elif key == 'mapG':
            self.mapG = value
        elif key == 'mapB':
            self.mapB = value
        elif key == 'mapW':
            self.mapW = value
        elif key == 'kernelR':
            self.kernelR = value
        elif key == 'kernelG':
            self.kernelG = value
        elif key == 'kernelB':
            self.kernelB = value
        elif key == 'kernelW':
            self.kernelW = value
        elif key == 'color':
            self.color = value
        elif key == 'gray_level':
            self.gray_level = value
        elif key == 'extra':
            self.extra = value
        else:
            raise KeyError('brt has no key')